package cn.hou.java.designpattern._15mediator;

//需要交互的类的抽象父类
public abstract class Person {
	
	private String name; //名字
	private int condition;//条件
	private Mediator mediator;//引用中介者,实际使用中介者来匹配
	public Person(String name, int condition, Mediator mediator) {
		this.name = name;
		this.condition = condition;
		this.mediator = mediator;
	}
	//类与类之间进行交互方法(模拟相亲)
	public abstract void getMatching(Person person);
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getCondition() {
		return condition;
	}
	public void setCondition(int condition) {
		this.condition = condition;
	}
	public Mediator getMediator() {
		return mediator;
	}
	public void setMediator(Mediator mediator) {
		this.mediator = mediator;
	}
}
